<?php
abstract class Core_db_abstract
{
	protected static function _getDbConn($config)
	{
		$dsn = 'mysql:host='.$config['host'].';dbname='.Core_config::getConfig('DB_DBNAME').';port='.$config['port'];
		$db = new PDO($dsn, 
				$config['user'], 
				$config['pwd'],
				array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \''.Core_config::getConfig('DB_CHARSET').'\''));
		return $db;
	}
}